package main

import (
	"context"
	pb "github.com/goAdminMicroService/api/proto"
	"google.golang.org/grpc"
	"log"
)

func main() {
	conn, err := grpc.Dial("127.0.0.1:9999", grpc.WithInsecure())
	if err != nil {
		log.Fatal(err)
	}
	defer conn.Close()
	client := pb.NewDetailsClient(conn)
	response, err := client.Get(context.Background(), &pb.GetDetailRequest{Id: 1})
	if err != nil {
		log.Fatal(err)
	}
	log.Println("返回结果" ,response)
}
